﻿using DirectSell.Model.Money;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Webdiyer.WebControls.Mvc;

namespace Direct.IDAL.User.Money
{
    /// <summary>
    /// 货币转换仓储接口
    /// </summary>
    public interface IMoneyTransforRepository:IAbsRepository
    {
        /// <summary>
        /// 查奖金余额
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        decimal GetRealMoney(string usercode);
        /// <summary>
        /// 查电子币余额
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        decimal GetVirtualMoney(string usercode);
        /// <summary>
        /// 查转换记录
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        Task<PagedList<MoneyTransfor>> GetRecord(string usercode, int pageindex, int pagesize);
        /// <summary>
        /// 奖金转电子币
        /// </summary>
        /// <param name="money"></param>
        /// <param name="usercode"></param>
        /// <param name="hsTable"></param>
        void RealToVirtual(decimal money, string usercode, ref Hashtable hsTable);
        /// <summary>
        /// 写入转换记录表
        /// </summary>
        /// <param name="req"></param>
        /// <param name="hstable"></param>
        void InsertRecord(MoneyTransforReq req, ref Hashtable hstable);
    }
}
